<?php
/**
 * @version		$Id: mod_geotrails.php 20806 2011-02-21 19:44:59Z jerome $
 * @package		Vsb.Site
 * @subpackage	mod_geotrails
 * @copyright	Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */

// no direct access
defined('_JEXEC') or die;

$application = JFactory::getApplication();
$menu	     = $application->getMenu();
$active	     = $menu->getActive();

jimport('joomla.form.form');
jimport('joomla.application.component.view');
jimport('joomla.application.component.modelitem');

// Include the syndicate functions only once
require_once dirname(__FILE__).'/helper.php';

$langue_code = modGeotrailsHelper::getLanguageCode();

$Itemid      = JRequest::getInt('Itemid');
$activityId  = JRequest::getInt('activityId');

$search_form = JForm::getInstance('form_filter_list', JPATH_COMPONENT.'/models/forms/form_filter_list.xml');

if (JRequest::getVar('option') == 'com_geotrails' && $active) {
	if (JRequest::getVar('view') == 'geotrails' || JRequest::getVar('view') == 'maps') {
		require JModuleHelper::getLayoutPath('mod_geotrails', $params->get('layout', 'default'));
	} else {
		require JModuleHelper::getLayoutPath('mod_geotrails', 'default_back');
	}
}
?>